#ifndef _PRINTER_H_
#define _PRINTER_H_

#include <stdint.h>
#include <com_hal.h>
#include "osObjects.h"   
#include "time.h"

#ifdef   _PRINTER_MOUDEL_
#define  PT_EXT
#else
#define  PT_EXT  extern
#endif

#define PRINTER_NONE                   0
#define PRINTER_WH_AA                  1
#define PRINTER_WH_E361    		       2
#define PRINTER_R021			       3
#define PRINTER_Z021		       	   4
#define PRINTER_PS1				       5
#define PRINTER_PS2				       6

#define PRINTER_CMD_INIT               0
#define PRINTER_CMD_SYMBOLSEL          1
#define PRINTER_CMD_LINE_CH            2
#define PRINTER_CMD_PAPER_RUN          3
#define PRINTER_CMD_LINE_SPACE_SET	   4
#define PRINTER_CMD_SYMBOL_SPACE_SET   5
#define PRINTER_CMD_LIMITE_RIGHT_SET   6
#define PRINTER_CMD_LIMITE_LEFT_SET    7
#define PRINTER_CMD_CR                 8
#define PRINTER_CMD_HALF_CHNESE        9
#define PRINTER_CMD_DOWN_LINE          10
#define PRINTER_CMD_UP_LINE            11

#define PRINTER_LINESIZE_WH_AA         32
#define PRINTER_LINESIZE_WH_E361       40
#define PRINTER_LINESIZE_R021		   16
#define PRINTER_LINESIZE_Z021		   16
#define PRINTER_LINESIZE_PS1		   32
#define PRINTER_LINESIZE_PS2		   32

#define PtBuff                         ComBuff

	typedef enum
	{
		SYMBOL_EN1 = 0,
		SYMBOL_EN2 = 1,
		SYMBOL_CN  = 2
	
	} SYMBOL_Type;

    
    typedef enum
	{
		PT_DATA_TEM = 0,
		PT_DATA_TEM_AND_HUM = 1,  //温湿度
		PT_DATA_TEM_AND_COL = 2,  //温度浓度
		PT_DATA_TEM_AND_SPD = 3,  //温度转速
	} PT_DATA_Type;




    PT_EXT int16_t PtTempPV;
    PT_EXT int16_t PtTempSV;
    PT_EXT int16_t PtHumiPV;
    PT_EXT int16_t PtHumiSV;
    PT_EXT int16_t PtColPV;
    PT_EXT int16_t PtColSV;
    PT_EXT int16_t PtSpeedPV;
    PT_EXT int16_t PtSpeedSV;
    
	PT_EXT uint8_t PtDataType;
	PT_EXT uint16_t PtCnt;    
	PT_EXT uint8_t PtType;
	PT_EXT uint8_t PtLineSize;
    PT_EXT uint16_t PtLen;
    PT_EXT TIME_Type TimePt;
    
	void PrinterInit(void);
	void SymbolSel(SYMBOL_Type SymbolType);
	void LineSpaceSet(uint8_t Space);
	void SymbolSpaceSet(uint8_t Space);
	void PtPaperRun(uint8_t dots);
	void PtString(uint8_t  *Src);
	void PtStringNoUpdate(uint8_t  *Src);


#undef PT_EXT
#endif
